<template>
  <view class="kindergartenCard app_container_kindergartenCard">
    <image :src="kindergarten.img" mode="aspectFill"></image>
    <view class="contentRight">
      <text class="litle">{{ kindergarten.name ? kindergarten.name : '--' }}</text>
      <view> 地址：{{ kindergarten.address ? kindergarten.address : '--' }} </view>
      <view> 园长：{{ kindergarten.director ? kindergarten.director : '--' }} </view>
      <view> 联系方式：{{ kindergarten.phone ? kindergarten.phone : '--' }} </view>
      <view> 加入时间： {{ dayjs(kindergarten.createTime).format('YYYY年MM月DD日') }} </view>
    </view>
  </view>
</template>

<script>
import dayjs from 'dayjs'
export default {
  props: {
    kindergarten: {
      type: Object
    }
  },
  data() {
    return {
      dayjs: null
    }
  },
  created() {
    this.dayjs = dayjs
  }
}
</script>

<style lang="scss">
app-kindergarten-card {
  display: block;
}
.kindergartenCard {
  min-height: 300rpx;
  background: #ffffff;
  box-shadow: 0px 10rpx 40rpx 0px rgba(0, 0, 0, 0.1);
  border-radius: 20rpx;
  display: flex;
  image {
    width: 240rpx;
    height: 300rpx;
    margin-right: 33rpx;
  }
  .contentRight {
    flex: 1;
    .litle {
      height: 84rpx;
      line-height: 84rpx;
      font-size: 30rpx;
    }
    view {
      font-size: 24rpx;
      line-height: 50rpx;
    }
  }
}
</style>
